<script setup>
import Demo18 from './Demo18.vue'
import {ref} from 'vue'
let count1=ref(0)
let init=ref(false)
let arr=ref(['唱歌','跳舞'])
let obj=ref({username:"张三",number:"202306050101"})
let shujv=ref(0)
function shuziA(value){
    console.log("---------->",value)
    shujv.value=value
}
</script>
<template>
<h1>1,父组件向子组件传递数据--- 父元素</h1>
<br>
==调佣子组件
<Demo18 num1="nishisb" :count1="count1" init="true" :arr="arr" :obj="obj"/>
<button @click="count1++">++</button>
<button @click="count1--">--</button>
<br>
===监听子组件 shujv:{{shujv}}
<Demo18 @shuzi="shuziA"/> 
</template>
<style>
</style>
